﻿@model ComicBookApp.Web.Models.ComicBookDetailVM

<div class="row">
    <div class="col-sm-3">
        <img class="img-responsive" src="@Model.ComicBook.ImageUrl" />
    </div>
    <div class="col-sm-5">
        <h2>@Model.ComicBook.Title <small><a href="/ComicBook/Edit/@Model.ComicBook.Id">Edit</a></small></h2>
        <p>@Model.ComicBook.Synopsis</p>
    </div>
</div>
<div class="row">
    <h3>Characters <small><a href="/Character/Add/@Model.ComicBook.Id">+Add Character</a></small></h3>
</div>
<div class="row">
    <table class="table">
        @foreach(var character in @Model.Characters)
        {
            <tr onclick="location.href='/Character/Detail/@character.Id'">
                <td>
                    @character.Name
                </td>
            </tr>
        }
    </table>
</div>
<div class="row">
    <h3>Creators <small><a href="/Creator/Add/@Model.ComicBook.Id">+Add Creator</a></small></h3>
</div>
<div class="row">
    <table class="table">
        @foreach (var creator in @Model.Creators)
        {
            <tr onclick="location.href='/Creator/Detail/@creator.Id'">
                <td>@creator.Name</td>
                <td>@creator.Role</td>
            </tr>
        }
    </table>
</div>

